import request from '@/utils/request'

export const userInfo=()=>{
    // 封装一个获取用户资料的接口
    return request({
        url:'/v1_0/user/profile',
      
    })
}
// 用户资料
export const editProfile=(data)=>{
    return request({
        url:'/v1_0/user/profile',
        method:'PATCH',
        data
    })

}

// 头像
export const headPortrait=(data)=>{
    return request({
        url:'/v1_0/user/photo',
        method:'PATCH',
        data
    })

}

// 封装关注用户
export const followings=(data)=>{
    return request({
        url:'/v1_0/user/followings',
        method:'post',
        data
    })

}
// 封装取消关注用户
export const cancelFollow=(id)=>{
    return request({
        url:'/v1_0/user/followings/' + id,
        method:'delete',
    })

}
